import {HttpClient} from '@angular/common/http';
import {Injectable} from '@angular/core';
import {Observable} from "rxjs/Observable";

@Injectable()
export class WebcastIndexProvider {

    constructor(public http: HttpClient) {
    }

    /**
     * 获取直播推荐列表数据
     * @returns {Observable<Object>}
     */
    getRecommendVideoList(): Observable<any> {
        return this.http.get(`/livestreaming/v1/recommend`);
    }

    /*获取回放视频列表数据*/
    getPlayBackVideoList(selectedVideoType: string): Observable<any> {
        return this.http.get(`/livestreaming/v1/playback/${selectedVideoType}&4`);
    }

    /*获取回放视频删选类型*/
    getPlayBackVideoTypes(): Observable<any> {
        return this.http.get(`/livestreaming/v1/playbacktype`);
    }
}
